<template>
  <div class="contents">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="分拣打印" name="first">
        <el-form
          class="demo-form-inline"
          :inline="true"
          label-position="right"
          label-width="110px"
          :model="formInline"
        >
          <el-form-item label="发货日期:">
            <el-date-picker
              class="writeWidth"
              v-model="value1"
              type="date"
              placeholder="选择日期"
            ></el-date-picker>
          </el-form-item>
          <el-form-item label="收货时间:">
            <el-select v-model="value" placeholder="请选择">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item
            :style="{ visibility: !openCol ? 'hidden' : 'visible' }"
          >
            <el-button type="primary">查询</el-button>
            <el-dropdown style="margin-left: 10px;">
              <el-button>
                导出汇总表
                <i class="el-icon-arrow-down el-icon--right"></i>
              </el-button>
              <el-dropdown-menu slot="dropdown">
                <el-dropdown-item>仅导出下单的数据</el-dropdown-item>
                <el-dropdown-item>导出下单+分拣数量</el-dropdown-item>
                <el-dropdown-item>带备注下单数量</el-dropdown-item>
              </el-dropdown-menu>
            </el-dropdown>
          </el-form-item>
          <el-form-item>
            <el-button
              type="text"
              @click="clickOpen"
              style="margin-left: 40px;"
            >
              <span :style="{ visibility: openCol ? 'hidden' : 'visible' }">
                收起
              </span>
              高级筛选
              <vab-icon
                :icon="openCol ? 'arrow-down-s-line' : 'arrow-up-s-line'"
              />
            </el-button>
          </el-form-item>
          <br />
          <div v-show="!openCol">
            <el-form-item label="仓库:">
              <el-select v-model="value" placeholder="请选择">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="库区:">
              <el-select v-model="value" placeholder="请选择">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="区域:">
              <el-select v-model="value" placeholder="请选择">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="装车:">
              <el-select v-model="value" placeholder="请选择">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="商品筛选:">
              <el-cascader
                v-model="value"
                clearable
                :options="options"
                placeholder="选择上下架"
              />
            </el-form-item>
            <el-form-item label="线路:">
              <el-select v-model="value" placeholder="请选择">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="是否标品:">
              <el-select v-model="value" placeholder="请选择">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="分拣状态:">
              <el-select v-model="value" placeholder="请选择">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="默认供应商:">
              <el-select v-model="value" placeholder="请选择">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="采购员:">
              <el-select v-model="value" placeholder="请选择">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="是否缺货:">
              <el-select v-model="value" placeholder="请选择">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="是否备注:">
              <el-select v-model="value" placeholder="请选择">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="商品搜索:">
              <el-input class="writeWidth"></el-input>
            </el-form-item>
            <el-form-item label="客户:">
              <el-input class="writeWidth"></el-input>
            </el-form-item>
            <el-form-item label="客户临时编码:">
              <el-input class="writeWidth"></el-input>
            </el-form-item>
            <el-form-item label="分拣阈值:">
              <el-select v-model="value" placeholder="请选择">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
            <br />
            <el-form-item label=" " label-width="110px">
              <el-button type="primary">查询</el-button>
              <el-button>重置</el-button>
              <el-dropdown style="margin-left: 10px;">
                <el-button>
                  导出汇总表
                  <i class="el-icon-arrow-down el-icon--right"></i>
                </el-button>
                <el-dropdown-menu slot="dropdown">
                  <el-dropdown-item>仅导出下单的数据</el-dropdown-item>
                  <el-dropdown-item>导出下单+分拣数量</el-dropdown-item>
                  <el-dropdown-item>带备注下单数量</el-dropdown-item>
                </el-dropdown-menu>
              </el-dropdown>
            </el-form-item>
          </div>
        </el-form>
        <div class="common__operation">
          <div class="slot-left">
            <el-dropdown split-button>
              一键分拣
              <el-dropdown-menu slot="dropdown">
                <el-dropdown-item>一键恢复</el-dropdown-item>
              </el-dropdown-menu>
            </el-dropdown>
            <el-button style="margin-left: 10px;">一键打印</el-button>
            <el-button>打印分拣汇总</el-button>
            <el-button>批量标记缺货</el-button>
          </div>
          <div class="slot-right">
            <el-checkbox>分拣时不打印标签</el-checkbox>
            <tooltip-msg messages="开启后，分拣时不打印分拣小票" place="left" />
          </div>
        </div>
        <el-table :data="table1" style="width: 100%;">
          <el-table-column width="50px">
            <template slot="header" slot-scope>
              <i class="el-icon-s-operation"></i>
            </template>
          </el-table-column>
          <el-table-column prop="address" label="商品名称"></el-table-column>
          <el-table-column prop="address" label="库区/库位"></el-table-column>
          <el-table-column prop="address" label="客户名称"></el-table-column>
          <el-table-column prop="address" label="订购数量"></el-table-column>
          <el-table-column prop="address" label="实际数量"></el-table-column>
          <el-table-column prop="address" label="生产日期"></el-table-column>
          <el-table-column prop="address" label="操作"></el-table-column>
        </el-table>
        <el-pagination
          background
          layout="total, prev, pager, next,sizes"
          :page-size="100"
          :page-sizes="[100, 200, 300]"
          style="text-align: right;"
          :total="0"
        />
      </el-tab-pane>
      <el-tab-pane label="订单差异分拣" name="second">
        <el-form :inline="true" :model="formInline" class="demo-form-inline">
          <el-row>
            <el-form-item label="发货日期">
              <el-date-picker
                v-model="value1"
                type="date"
                placeholder="选择日期"
              ></el-date-picker>
            </el-form-item>
            <el-form-item label="仓库">
              <el-select v-model="formInline.region" placeholder="活动区域">
                <el-option label="区域一" value="shanghai"></el-option>
                <el-option label="区域二" value="beijing"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="库区">
              <el-select v-model="formInline.region" placeholder="活动区域">
                <el-option label="区域一" value="shanghai"></el-option>
                <el-option label="区域二" value="beijing"></el-option>
              </el-select>
            </el-form-item>
          </el-row>
          <el-row>
            <el-form-item label="异常情况">
              <el-select v-model="formInline.region" placeholder="情况">
                <el-option label="区域一" value="shanghai"></el-option>
                <el-option label="区域二" value="beijing"></el-option>
              </el-select>
            </el-form-item>
          </el-row>
          <el-row>
            <el-col :span="20">
              <el-form-item label="商品搜索">
                <div style="display: flex;">
                  <el-input style="width: 240px; margin-right: 5px;"></el-input>
                  <el-input style="width: 185px; margin-right: 5px;"></el-input>
                  <el-button type="success">搜索</el-button>
                  <span class="current-store">当前仓库：默认库房</span>
                </div>
              </el-form-item>
            </el-col>
            <el-col :span="4" style="text-align: right;">
              <el-button @click="drawer = true">表头设置</el-button>
            </el-col>
          </el-row>
        </el-form>
        <el-drawer
          title="选择表头显示列"
          :modal="false"
          :show-close="false"
          :visible.sync="drawer"
        >
          <div style="padding: 15px 0 15px 20px;display:inline-grid">
            <el-checkbox label="商品名称"></el-checkbox>
            <el-checkbox label="库区/库位"></el-checkbox>
            <el-checkbox label="客户名称"></el-checkbox>
            <el-checkbox label="订购数量"></el-checkbox>
            <el-checkbox label="实际数量"></el-checkbox>
          </div>
        </el-drawer>
        <el-table :data="table2" style="width: 100%;">
          <el-table-column prop="address" label="商品名称"></el-table-column>
          <el-table-column prop="address" label="库区/库位"></el-table-column>
          <el-table-column prop="address" label="客户名称"></el-table-column>
          <el-table-column prop="address" label="订购数量"></el-table-column>
          <el-table-column prop="address" label="实际数量"></el-table-column>
          <el-table-column prop="address" label="生产日期"></el-table-column>
          <el-table-column prop="address" label="单位"></el-table-column>
          <el-table-column prop="address" label="描述"></el-table-column>
          <el-table-column prop="address" label="分拣状态"></el-table-column>
          <el-table-column prop="address" label="分拣员"></el-table-column>
        </el-table>
      </el-tab-pane>
      <el-tab-pane label="商品分拣进度" name="third">
        <el-form
          class="demo-form-inline"
          :inline="true"
          label-position="right"
          label-width="80px"
          :model="formInline"
        >
          <el-form-item label="发货日期:">
            <el-date-picker
              class="writeWidth"
              v-model="value1"
              type="date"
              placeholder="选择日期"
            ></el-date-picker>
          </el-form-item>
          <el-form-item label="搜索:">
            <el-input
              class="writeWidth"
              v-model="formInline.user"
              placeholder="输入商品搜索"
            />
          </el-form-item>
          <el-form-item
            :style="{ visibility: !openThird ? 'hidden' : 'visible' }"
          >
            <el-button type="primary">查询</el-button>
          </el-form-item>
          <el-form-item>
            <el-button
              style="margin-left: 85px;"
              type="text"
              @click="clickOpenthird"
            >
              <span :style="{ visibility: openThird ? 'hidden' : 'visible' }">
                收起
              </span>
              高级筛选
              <vab-icon
                :icon="openThird ? 'arrow-down-s-line' : 'arrow-up-s-line'"
              />
            </el-button>
          </el-form-item>
          <br />
          <div v-show="!openThird">
            <el-form-item label="库房:">
              <el-select v-model="formInline.region" placeholder="情况">
                <el-option label="默认库房" value="shanghai"></el-option>
                <el-option label="冻货库房" value="beijing"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="分拣状态:">
              <el-select v-model="formInline.region" placeholder="分拣状态">
                <el-option label="未分拣" value="shanghai"></el-option>
                <el-option label="分拣中" value="beijing"></el-option>
                <el-option label="已分拣" value="beijing"></el-option>
              </el-select>
            </el-form-item>
            <br />
            <el-form-item label=" ">
              <el-button type="primary">查询</el-button>
              <el-button>重置</el-button>
            </el-form-item>
          </div>
        </el-form>
        <el-table :data="table3" style="width: 100%;">
          <el-table-column prop="address" label="ID"></el-table-column>
          <el-table-column prop="address" label="商品编码"></el-table-column>
          <el-table-column prop="address" label="商品名称"></el-table-column>
          <el-table-column prop="address" label="单位"></el-table-column>
          <el-table-column prop="address" label="商品描述"></el-table-column>
          <el-table-column
            prop="address"
            label="已分拣/单位数"
          ></el-table-column>
          <el-table-column
            prop="address"
            label="已分拣/包裹数"
          ></el-table-column>
          <el-table-column prop="address" label="分拣进度"></el-table-column>
          <el-table-column prop="address" label="操作"></el-table-column>
        </el-table>
        <el-pagination
          background
          layout="total, prev, pager, next,sizes"
          :page-size="20"
          :page-sizes="[20, 30, 40, 50]"
          style="text-align: right;"
          :total="0"
        />
      </el-tab-pane>
      <el-tab-pane label="客户分拣进度" name="fourth">
        <el-form
          class="demo-form-inline"
          :inline="true"
          label-position="right"
          label-width="80px"
          :model="formInline"
        >
          <el-form-item label="发货日期:">
            <el-date-picker
              class="writeWidth"
              v-model="value1"
              type="date"
              placeholder="选择日期"
            ></el-date-picker>
          </el-form-item>
          <el-form-item label="搜索:">
            <el-input
              class="writeWidth"
              v-model="formInline.user"
              placeholder="输入商品搜索"
            />
          </el-form-item>
          <el-form-item
            :style="{ visibility: !openThird ? 'hidden' : 'visible' }"
          >
            <el-button type="primary">查询</el-button>
          </el-form-item>
          <el-form-item>
            <el-button
              style="margin-left: 85px;"
              type="text"
              @click="clickOpenthird"
            >
              <span :style="{ visibility: openThird ? 'hidden' : 'visible' }">
                收起
              </span>
              高级筛选
              <vab-icon
                :icon="openThird ? 'arrow-down-s-line' : 'arrow-up-s-line'"
              />
            </el-button>
          </el-form-item>
          <br />
          <div v-show="!openThird">
            <el-form-item label="线路:">
              <el-select v-model="formInline.region" placeholder="选择线路">
                <el-option label="默认库房" value="shanghai"></el-option>
                <el-option label="冻货库房" value="beijing"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="库房:">
              <el-select v-model="formInline.region" placeholder="默认库房">
                <el-option label="默认库房" value="shanghai"></el-option>
                <el-option label="冻货库房" value="beijing"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="分拣状态:">
              <el-select v-model="formInline.region" placeholder="分拣状态">
                <el-option label="未分拣" value="shanghai"></el-option>
                <el-option label="分拣中" value="beijing"></el-option>
                <el-option label="已分拣" value="beijing"></el-option>
              </el-select>
            </el-form-item>
            <br />
            <el-form-item label=" ">
              <el-button type="primary">查询</el-button>
              <el-button>重置</el-button>
            </el-form-item>
          </div>
        </el-form>
        <el-table :data="table4" style="width: 100%;">
          <el-table-column prop="address" label="ID"></el-table-column>
          <el-table-column prop="address" label="用户编码"></el-table-column>
          <el-table-column prop="address" label="客户名称"></el-table-column>
          <el-table-column prop="address" label="线路"></el-table-column>
          <el-table-column
            prop="address"
            label="已分拣/包裹数"
          ></el-table-column>
          <el-table-column prop="address" label="分拣进度"></el-table-column>
          <el-table-column prop="address" label="分拣状态"></el-table-column>
          <el-table-column prop="address" label="操作"></el-table-column>
        </el-table>
        <el-pagination
          background
          layout="total, prev, pager, next,sizes"
          :page-size="20"
          :page-sizes="[20, 30, 40, 50]"
          style="text-align: right;"
          :total="0"
        />
      </el-tab-pane>
      <el-tab-pane label="缺货商品" name="fifth">
        <el-form
          class="demo-form-inline"
          :inline="true"
          label-position="right"
          label-width="80px"
          :model="formInline"
        >
          <el-form-item label="发货日期:">
            <el-date-picker
              class="writeWidth"
              v-model="value1"
              type="date"
              placeholder="选择日期"
            ></el-date-picker>
          </el-form-item>
          <el-form-item label="商品搜索:">
            <el-input
              class="writeWidth"
              v-model="formInline.user"
              placeholder="名称/编码/助记码/别名/关键字"
            />
          </el-form-item>
          <el-form-item
            :style="{ visibility: !openThird ? 'hidden' : 'visible' }"
          >
            <el-button type="primary">查询</el-button>
          </el-form-item>
          <el-form-item>
            <el-button
              style="margin-left: 85px;"
              type="text"
              @click="clickOpenthird"
            >
              <span :style="{ visibility: openThird ? 'hidden' : 'visible' }">
                收起
              </span>
              高级筛选
              <vab-icon
                :icon="openThird ? 'arrow-down-s-line' : 'arrow-up-s-line'"
              />
            </el-button>
          </el-form-item>
          <br />
          <div v-show="!openThird">
            <el-form-item label="库房:">
              <el-select v-model="formInline.region" placeholder="情况">
                <el-option label="默认库房" value="shanghai"></el-option>
                <el-option label="冻货库房" value="beijing"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="客户:">
              <el-input
                class="writeWidth"
                v-model="formInline.user"
                placeholder="请输入客户名称/编码"
              />
            </el-form-item>
            <br />
            <el-form-item label=" ">
              <el-button type="primary">查询</el-button>
              <el-button>重置</el-button>
            </el-form-item>
          </div>
        </el-form>
        <div style="padding-bottom: 16px;">
          <el-dropdown>
            <el-button>
              导出
              <i class="el-icon-arrow-down el-icon--right"></i>
            </el-button>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item>商品汇总</el-dropdown-item>
              <el-dropdown-item>商品明细</el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
          <el-button type="primary" style="margin-left: 10px;">
            生成采购单
          </el-button>
        </div>
        <el-table :data="table5" style="width: 100%;">
          <el-table-column type="selection" width="55"></el-table-column>
          <el-table-column prop="address" label="商品名称"></el-table-column>
          <el-table-column
            prop="address"
            label="采购员/供应商"
          ></el-table-column>
          <el-table-column prop="address" label="描述"></el-table-column>
          <el-table-column prop="address" label="订购数量"></el-table-column>
          <el-table-column prop="address" label="已分拣数量"></el-table-column>
          <el-table-column prop="address" label="分拣状态"></el-table-column>
          <el-table-column prop="address" label="备注"></el-table-column>
          <el-table-column prop="address" label="操作"></el-table-column>
        </el-table>
        <el-pagination
          background
          layout="total, prev, pager, next,sizes"
          :page-size="20"
          :page-sizes="[20, 30, 40, 50]"
          style="text-align: right;"
          :total="0"
        />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
  import TooltipMsg from '@/components/TooltipMsg.vue'
  export default {
    components: {
      TooltipMsg,
    },
    data() {
      return {
        activeName: 'first',
        formInline: {
          user: '',
          region: '',
        },
        openCol: false,
        openThird: true,
        drawer: false,
        value: [],
        value1: '',
        options: [
          {
            value: 'quanbu',
            label: '全部分类',
          },
          {
            value: 'zhinan',
            label: '指南',
            children: [
              {
                value: 'shejiyuanze',
                label: '设计原则',
              },
              {
                value: 'daohang',
                label: '导航',
              },
            ],
          },
          {
            value: 'zujian',
            label: '组件',
            children: [
              {
                value: 'basic',
                label: 'Basic',
              },
              {
                value: 'form',
                label: 'Form',
              },
            ],
          },
          {
            value: 'ziyuan',
            label: '资源',
            children: [
              {
                value: 'axure',
                label: 'Axure Components',
              },
            ],
          },
        ],
        table1: [],
        table2: [],
        table3: [],
        table4: [],
        table5: [],
      }
    },
    methods: {
      handleClick(tab, event) {
        console.log(tab)
        console.log(event)
      },
      clickOpen() {
        this.openCol = !this.openCol
      },
      clickOpenthird() {
        this.openThird = !this.openThird
      },
    },
  }
</script>

<style lang="scss" scoped>
  .contents {
    padding: 0 20px;

    .writeWidth {
      width: 215px;
    }

    .common__operation {
      display: flex;
      justify-content: space-between;
      padding: 16px 0;

      .slot-right {
        display: flex;
        align-items: center;
      }
    }

    .current-store {
      margin-left: 15px;
      font-size: 16px;
      font-weight: 700;
    }
  }
</style>
